﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shop.Master" AutoEventWireup="true" CodeBehind="ListaPedidos.aspx.cs" Inherits="ShopNet.ListaPedidos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">

<div id="content_top"></div>
<div id="content_middle">
<h3>Meus Pedidos</h3>
    <fieldset>
        <legend>Selecione uma opção de filtro</legend>
        <div class="grid-4-12">
        <p><label class="info-label">Código Pedido:</label></p>
        <p><asp:TextBox ID="tbUniqIdPedido" runat="server" MaxLength="10" CssClass="input_field_simple  size-big"></asp:TextBox></p>
        </div>
        <div class="grid-5-12">
        <p><label class="info-label">Situação:</label></p>
        <p><asp:DropDownList ID="ddlSitucao" runat="server" CssClass="select_field">
        </asp:DropDownList></p>
        </div>
        <div class="grid-3-12">
        <p>&nbsp;</p>
        <p><asp:Button ID="bFiltrar" runat="server" Text="Filtrar" OnClick="Filtrar_Click" CssClass="submit_btn" /></p>
        </div>
    </fieldset>

    <p>&nbsp;</p>
    <div class="grid-12-12 table">
        <asp:GridView ID="gvPedidos" runat="server" AutoGenerateColumns="False" 
             Width="90%" AllowPaging="true" OnPageIndexChanging="gvPedidos_OnPageIndexChanging"
            OnRowDataBound="gvPedidos_RowDataBound" OnRowCommand="gvPedidos_RowCommand" ShowFooter="false">
            <HeaderStyle CssClass="table-head" />
            <FooterStyle CssClass="total" />
        <Columns>        
            <asp:TemplateField HeaderText="Pedido">
                <ItemTemplate>
                    <asp:LinkButton ID="lbPedido" runat="server" CommandName="Visualizar" CommandArgument='<%#Bind("IdPedido") %>' Text='<%#Bind("IdPedido") %>'></asp:LinkButton>
                </ItemTemplate>            
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Data">
                <ItemTemplate>
                    <asp:Label ID="lData" runat="server" Text='<%# Bind("Data") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Status">
                <ItemTemplate>
                    <asp:Label ID="lStatus" runat="server" Text='<%# Convert.ToInt64(Eval("status")) %>' ></asp:Label>
                </ItemTemplate>                
            </asp:TemplateField> 
        </Columns>    
        </asp:GridView>
    </div>

</div>
<div id="content_bottom"></div>

</asp:Content>
